package org.zfes.snowier.common.monitor.utils;
import java.net.InetAddress;
import java.net.UnknownHostException;



public class HostUtils {

	
	public static String getHostIp() {
		try {
			return InetAddress.getLocalHost().getHostAddress();
		} catch (UnknownHostException e) {
		}
		return "127.0.0.1";
	}

	public static String getHostName() {
		try {
			return InetAddress.getLocalHost().getHostName();
		} catch (UnknownHostException e) {
		}
		return "未知";
	}
	
}
